package com.HomeWork12.work2;

public class Dogface extends Moster{
    private int dogfaceatk;

    public Dogface(String name, double blood, int MatkMax, int MatkMin, int dogfaceatk) {
        super(name, blood, MatkMax, MatkMin);
        this.dogfaceatk = dogfaceatk;
    }

    public Dogface() {

    }

    @Override
    public void attack(Player player) {
        System.out.println("攻击玩家");
        System.out.println(dogfaceatk);
        dogfaceatk =  (int)(Math.random()*(this.MatkMax-this.MatkMin)+this.MatkMin);
        System.out.println(this.name+"本次伤害"+dogfaceatk);
        int playBlood= player.getPlayerBlood();
        playBlood=playBlood-dogfaceatk;
        System.out.println("玩家的剩余血量"+playBlood);
        player.setPlayerBlood(playBlood);
    }
}
